import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";


type homeResult = {
  page: any;
  result: any
};



/** 根据id删除项目 */
export const deleteXprojectControllerDelbyid = (userid?: string | number) => {
  return http.request<homeResult>("delete", baseUrlApi(`/xprojectController/delbyid/${userid}`));
};


/** 修改绑定项目 */
export const updateXprojectControllerUpdate = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xprojectController/update"), { data });
};


/** 分页查询 */
export const getXprojectControllerSelectbypage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xprojectController/selorbypage"), { data });
};

/** 根据id查询 */
export const IdXprojectControllerSelect = (id) => {
  return http.request<homeResult>("get", baseUrlApi(`/xprojectController/select/${id}`));
};

/** 绑定项目 */
export const getXprojectControllerInsert = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xprojectController/insert"), { data });
};


/** 查询项目(下拉框) */
export const getXprojectControllerselbypage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/xprojectController/selbypage"), { data });
};